import Vue from 'Vue'
//1.1导入路由
import VueRouter from 'vue-router'
//1.2安装路由
Vue.use(VueRouter)

//2.1导入vue-resource
import VueResource from 'vue-resource'
//2.2 安装vue-resource
Vue.use(VueResource)

//导入时间插件
import moment from 'moment'
//定义全局的过滤器
Vue.filter('dateFormat', function(datestr, pattern = "YYYY-MM-DD HH:mm:ss"){
	return moment(datestr).format(pattern)
})
/*import { Lazyload } from 'mint-ui';
Vue.use(Lazyload);
//按需导入mint-ui中的组件
import {Header,Swipe, SwipeItem } from 'mint-ui'
Vue.component(Header.name, Header)
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);*/

//要实现懒加载，需要导入全部样式，不能按需导入
import MintUI from 'mint-ui'
Vue.use(MintUI)
import 'mint-ui/lib/style.css'

//导入MUI样式
import '../lib/mui/css/mui.css'
import '../lib/mui/css/icons-extra.css'
//1.3导入自己的router.js 路由模块
import router from './router.js'


//安装图片预览插件
import vuePreview from 'vue-preview'
Vue.use(vuePreview)

import app from './App.vue'
var vm = new Vue({
	el: '#app',
	data: {},
	methods: {},
	render: c => c(app),
	//1.4挂载路由对象
	router 
})